'use strict';

import React, {
	Component
} from 'react';
import {
	StyleSheet,
	Navigator,
	StatusBar,
	View
} from 'react-native';
import Splash from '../pages/Splash';

class App extends Component {
	constructor(props) {
		super(props);
		this.state = {

		}
	}

	renderScene(route, navigator) {
		const Component = route.component;
		return <Component {...route.params} navigator={navigator} />
	}

	render() {
		return (
			<View style={styles.container}>
		<StatusBar
		          backgroundColor="#3e9ce9"
		          barStyle="default"
		        />
		        <Navigator
		        style={styles.navigator}
		        configureScene={(route) => {
	                return Navigator.SceneConfigs.FadeAndroid;
	              }}
	              initialRoute={{ name: 'Splash', component: Splash }}
	              renderScene={this.renderScene}
	          
	             />
			</View>
		)
	}
}

const styles = StyleSheet.create({
	container: {
		flex: 1,
		backgroundColor: '#eeeeee',

	}
})

export default App;